package hyl.core.err;

import java.util.Map;

public class BaseException extends Exception {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String msg = "400 参数错误";
	private String errorCode = "10000";

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public void set(Map<String, String> params) {

		if (params.containsKey("msg")) {
			this.msg = params.get("msg");
		}
		if (params.containsKey("errorCode")) {
			this.errorCode = params.get("errorCode");
		}
	}
}
